package com.lzh.service.impl;


import com.lzh.bean.User1;
import com.lzh.mapper.UserMapper1;
import com.lzh.service.UserService;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper1 userMapper1;
    /**
     * 检查账号是否存在
     * @param account
     * @return 0不存在 大于0存在
     */
    @Override
    public int checkUser(String account) {
        int i = userMapper1.queryUserByUserName(account);
        return i;
    }

    @Override
    public User1 getUser(String account) {
        User1 user1 = userMapper1.queryByUserName(account);
        return user1;
    }


}
